import android.widget.ImageView
import androidx.databinding.BindingAdapter
import com.ljl.mvvmdemo.GlideApp

/**
 * BindingAdapter定义
 * created by luojialun on 2024/11/20
 */
@BindingAdapter(value = ["url", "placeholderRes"], requireAll = false)
fun setImageUri(iv: ImageView, url: String, placeholderRes: Int) {
    GlideApp.with(iv).load(url).placeholder(placeholderRes).into(iv)
}